﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using eTerm.MsSql.DbProvider;

namespace eTerm.Platform.Web.ISAPI
{
    /// <summary>
    /// Summary description for $codebehindclassname$
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class DeleteDETR : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            string ID = context.Request.Form["ID"];
            ID.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList().ForEach(l => {
                long id = long.Parse(l);
                new PnrDetr() { Id = id }.Delete();
            });
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
